-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on invalid jib.httpTimeout values at plugin front-ends #667
Conversation
You can start reviewing. Once #656 is merged, I'll change the target base for merging. |
Hmm... I just saw the |
Also, looks like I should throw |
try { | ||
String value = System.getProperty("jib.httpTimeout"); | ||
if (value != null && Integer.parseInt(value) < 0) { | ||
throw exceptionFactory.apply("negative value of jib.httpTimeout"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a wording of "jib.httpTimeout cannot be negative: -1234" (with the negative value)?
throw exceptionFactory.apply("negative value of jib.httpTimeout"); | ||
} | ||
} catch (NumberFormatException ex) { | ||
throw exceptionFactory.apply("non-integer value of jib.httpTimeout"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a wording of "jib.httpTimeout must be an integer: notaninteger" (with the attempted value)?
} | ||
} catch (NumberFormatException ex) { | ||
throw exceptionFactory.apply("non-integer value of jib.httpTimeout"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's include a private constructor for this static utility class.
Cools, we'll be able to do a v0.9.7 release after this is merged. |
@TadCordle We could probably do the |
To clarify, this is being handled correctly after #650. |
Fixes #582.